package com.lizhi.yun.db.sfrobot.entity;

import com.lizhi.mybatis.boot.Description;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 医院组织机构节点
 */
@Data
@ToString
//@Entity
//@Table(name="his_center_hospital_org")
@Description("医院结构")
public class HospitalOrg extends AbstractComEntity {
    @Id
    @Column(length = 30)
    @Description("lid")
    public String lid;

    @Description("记录id")
    public Long id;

    @Column
    @Description("编号")
    public String code;

    @Column
    @Description("名称")
    public String text;

    @Column
    @Description("父节点id")
    public Long parentId;

    @Column
    @Description("路径id")
    public Integer pathId;
    /**
     * parent/parent/parent/child/
     */
    @Column
    @Description("路径")
    public String path;
    /**
     * 节点类型
     * @see com.lizhi.yun.db.sfrobot.common.HospitalOrgType
     */
    @Column
    @Description("节点类型id")
    public Integer typeId;
    @Column
    @Description("节点类型名称")
    public String typeText;
    @Column
    @Description("节点等级")
    public Integer level;
    /**
     * 是否为叶子节点
     */
    @Column
    @Description("是否为叶节点")
    public Boolean isLeaf;

    /**
     * 简介
     */
    @Column
    @Description("简介")
    public String intro;

    @Column(length = 32)
    @Description("应用id")
    public String appId;
    /**
     * 和中心通讯时候的key
     */
    @Column(length = 64)
    @Description("通讯键")
    public String secretKey;

    @Column(length = 20)
    @Description("创建时间")
    public String createTime;
}
